package com.lin.project.cloudnative.controller;

import com.lin.project.cloudnative.common.ApplicationMonitorMessage;
import com.lin.project.cloudnative.common.ApplicationMonitorTask;
import com.lin.project.cloudnative.common.BaseResponse;
import com.lin.project.cloudnative.common.ResultUtils;
import io.swagger.annotations.Api;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:
 * @author: linhuaixu
 * @time: 2023/11/8 19:56
 */
@RestController
@RequestMapping("/status")
@Slf4j
@Api(tags = "JVM状态监控接口")
public class JVMStatusController {
    @GetMapping("/get")
    public BaseResponse<ApplicationMonitorMessage> getJVMStatus(){
        ApplicationMonitorTask applicationMonitorTask = new ApplicationMonitorTask();
        return ResultUtils.success(applicationMonitorTask.createMessage());
    }
}
